<!-- #include file="Setup.asp" -->
<%
UserName=HTMLEncode(Request("UserName"))
top
if CookieUserName=empty then error("<li>您还未<a href=Login.asp>登录</a>论坛")nxn
%>


<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr class=a3>
<td>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → <span id=bbsxpname></span></td>
</tr>
</table><br>

<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
  <TR id=TableTitleLink class=a1>
      <Td width="14%" align="center"><a href="?">最新帖子</a></td>
      <TD width="14%" align="center"><a href="?menu=1">本周人气帖子</a></td>
      <TD width="14%" align="center"><a href="?menu=2">本周热门帖子</a></td>
      <TD width="14%" align="center"><a href="?menu=3">精华帖子</a></td>
      <TD width="14%" align="center"><a href="?menu=4">投票帖子</a></td>
      <TD width="14%" align="center"><a href="?menu=5&UserName=<%=CookieUserName%>">我的帖子</a></td>
      </TR></TABLE>


<br>


<table cellspacing=1 cellpadding=5 border=0 width=100% class=a2>
<tr id="TableTitleLink" class="a1">
<td align="center" colspan="3">主题</td>
<td align="center" width="10%">作者</td>
<td align="center" width="6%">回复</td>
<td align="center" width="6%">点击</td>
<td align="center" width="25%">最后更新</td>
</tr>
<%
select case Request("menu")
case ""
sql="select top 200 * from [BBSXP_Threads] where IsDel=0 order by id Desc"
%><SCRIPT>bbsxpname.innerText="最新帖子"</SCRIPT><%
case "1"
sql="select top 200 * from [BBSXP_Threads] where IsDel=0 and PostTime>"&SqlNowString&"-7 order by Views Desc"
%><SCRIPT>bbsxpname.innerText="本周人气帖子"</SCRIPT><%
case "2"
sql="select top 200 * from [BBSXP_Threads] where IsDel=0 and PostTime>"&SqlNowString&"-7 order by replies Desc"
%><SCRIPT>bbsxpname.innerText="本周热门帖子"</SCRIPT><%
case "3"
sql="select top 200 * from [BBSXP_Threads] where IsGood=1 and IsDel=0 order by id Desc"
%><SCRIPT>bbsxpname.innerText="精华帖子"</SCRIPT><%
case "4"
sql="select top 200 * from [BBSXP_Threads] where IsVote=1 and IsDel=0 order by id Desc"
%><SCRIPT>bbsxpname.innerText="投票帖子"</SCRIPT><%
case "5"
sql="select top 200 * from [BBSXP_Threads] where UserName='"&UserName&"' and IsDel=0 order by id Desc"
%><SCRIPT>bbsxpname.innerText="<%=UserName%> 的帖子"</SCRIPT><%
case else
error2("错误参数！")
end select



Rs.Open sql,Conn,1

PageSetup=SiteSettings("ThreadsPerPage") '设定每页的显示数量
Rs.Pagesize=PageSetup
TotalPage=Rs.Pagecount  '总页数
PageCount = cint(Request.QueryString("PageIndex"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then Rs.absolutePage=PageCount '跳转到指定页数
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1
ShowThread()
Rs.MoveNext
loop
Rs.Close
%></table>

<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr><td>
<%ShowPage()%></td></tr></table>
<%
htmlend
%>